<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>演员管理</title>
    <link href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/>
</head>
<body>
<div class="container">
    <h1 class="text-center">演员管理页面</h1>
    <div class="row">
        <div class="col-2"><h6>姓名：  马泽强</h6></div>
        <div class="col-10"><h6>学号：  1604220525</h6></div>
    </div>
    <div class="dropdown-divider"></div>
    <div class="row">
        <div class="col-2">
            <div class="list-group">
                <a class="list-group-item list-group-item-action active" th:href="@{/movie/index}">电影管理</a>
                <a class="list-group-item list-group-item-action" th:href="@{/actor/index}" >演员管理</a>
            </div>
        </div>
        <div class="col">
            <a class="btn btn-primary" th:href="@{/actor/add}" >新增演员</a>
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th scope="col">#</th>
                    <th scope="col">姓名</th>
                    <th scope="col">性别</th>
                    <th scope="col">出生日期</th>
                    <th scope="col">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="actor,actorStat : ${list}">
                    <td th:text="${actorStat.index +1}"></td>
                    <td th:text="${actor.name}"></td>
                    <td th:text="${actor.sex}?${#numbers.formatInteger(actor.sex,1)}:''"></td>
                    <td th:text="${actor.born}?${#dates.format(actor.born,'yyyy-MM-dd')}:''"></td>
                    <td>
                        <a th:href="@{/actor/edit/{actorId}(actorId= ${actor.id})}">编辑</a>
                        <a th:href="@{/actor/delete/{id}(id= ${actor.id})}">删除</a>
                    </td>
                </tr>
                </tbody>

            </table>


        </div>

    </div>

</div>

</body>
</html>